<template>
	<view class="empty-view" :style="{ left: left }">
		<image :src="src" mode="aspectFit" class="empty-img"></image>
		<view class="empty-text">{{ text }}</view>
		<view v-if="!isLogin">
			<Login></Login>
		</view>
	</view>
</template>

<script>
	import Login from '@/components/Login.vue';
	import webUrl from '@/config.js';
export default {
	components:{Login},
	computed:{
		isLogin() {
			return this.$store.state.hasLogin;
		},
	},
	props: {
		left: {
			type: String,
			default: '0'
		},
		text: {
			type: String,
			default: '没有数据哦~~'
		},
		src: {
			type: String,
			default: webUrl.QN_URL + '/statics/address.png'
		}
	}
};
</script>

<style lang="scss">
.empty-view {
	width: 100%;
	text-align: center;
	margin-top: 200upx;
	.empty-img {
		width: 200rpx;
		height: 200rpx;
	}
	.empty-text {
		font-size: 26upx;
		color: #999999;
		padding-top: 10rpx;
	}
}
</style>
